package abstractfactoryp;

import factoryp.CarInterface;

public class MaterialFactory extends SuperFactory {
    public CarInterface getCar(String brandName) {
        return null;
    }

    public MaterialInterface getMaterial(String materialName) {
            if (materialName==null){
                return null;
            }
            if (materialName.equalsIgnoreCase("Air")){return  new Air();}else
        if (materialName.equalsIgnoreCase("Electric")){return  new Electric();}else
        if (materialName.equalsIgnoreCase("Oil")){return  new Oil();}

        return null;
    }
}
